/*
 * TexturePaint.java  0.4.0 / Oct 24, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
package com.cute4j.swing.graphics;

/**
 * Texture Paint.
 *
 * @author Slobodan Vrkacevic
 * @version 0.4.0
 */
public final class TexturePaint extends Paint {

// Private Fields. -------------------------------------------------------------

  private final Image image;

// Public Constructors. --------------------------------------------------------

  /**
   * Constructs new TexturePaint object.
   *
   * @param image the texture image
   *
   * @throws IllegalArgumentException if the <tt>image</tt> is <tt>null</tt>
   */
  public TexturePaint(Image image) {
    if (image == null) {
      throw new IllegalArgumentException("Null image");
    }
    this.image = image;
  }

// Public Methods. -------------------------------------------------------------

  /**
   * Returns the image.
   *
   * @return the image
   */
  public Image getImage() {
    return image;
  }

}
